import argparse
import os
import sys
import yaml
from PyQt5 import QtWidgets
from app import ReportMainWindow
from utils import newIcon
__appname__ = "ReportMG"

here = os.path.dirname(os.path.abspath(__file__))
default_config_file = "default_config.yaml"


def get_default_config(config_file):
    with open(config_file) as f:
        config = yaml.load(f)
    return config


if __name__ == '__main__':
    __appname__ = 'ReportMG'
    config = {'dicom_app': '/home/cao/itksnap/bin/itksnap'}
    app = QtWidgets.QApplication(['/home/cao/reportMG_windows/main.py'])
    app.setApplicationName(__appname__)
    app.setWindowIcon(newIcon("icon"))

    main_win = ReportMainWindow(__appname__, config)
    main_win.show()
    main_win.raise_()

    sys.exit(app.exec_())


#main()
